package org.corolla.cloth.compute;

import org.corolla.cloth.constdata.ClothSizeConst;
import org.corolla.cloth.entity.ClothSize;

public class ComputeMaterial {
	
	
    /**
     * 获取衣服的尺寸
     * 单位是m
     * @param clothSizeKey
     * @return
     */
	public static double getMaterial(String clothSizeKey){
		double material=0.0d;
		ClothSize clothSize = ClothSizeConst.getClothSizeMap().get(clothSizeKey);
		// 前衣长
		double hyc = clothSize.getHycLine();
		// 胸长 
		double xc = clothSize.getXcLine();	
		// 袖长
		double xw = clothSize.getXwLine();
		material = (hyc+xc+17.0)*(xw+23.0)/90.0/100.0d;
		return material;				
	}

}
